<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>filter</title>
    <script src="vue.js"></script>
</head>
<body>


<div id="app">
    <div>{{message|capitalize}}</div>

    <p :title="message">title</p>
</div>

<script>
    new Vue({
        el:'#app',
        data:{
            message:"hello world"
        },
        // ...
        filters: {
            capitalize: function (value) {
                if (!value) return ''
                value = value.toString()
                return value.charAt(0).toUpperCase() + value.slice(1)
            }
        }
    })
</script>

</body>
</html>